{% extends "base.html" %}{% load base_tags %}
{% block title %}Löschen des Accounts{% endblock %}
{% block content %}
{% if form %}
	{% hintblock %}
		Willst Du wirklich Deinen Account (<i>{{ user.username }}</i>) löschen? Diese Aktion kann <b>nicht</b> rückgängig gemacht werden!
	{% endhintblock %}
	<form method="post" action="{% url account_delete_my_account %}">
	{% csrf_token %}
	{% if form.errors %}
		{% errorblock %}
			{% for field in form %}{% if field.errors %}{{ field.label }}: {% for error in field.errors %}{{ error }}<br />{% endfor %}{% endif %}{% endfor %}
		{% enderrorblock %}
	{% endif %}
	<table>
	    {% for field in form %}
	    <tr>
	        <td>{{ field.label_tag }}</td>
	        <td>{{ field|safe }}
	        	{% if field.field.required %}*{% endif %}
	            {% if field.help_text %}
	                <br />
	                <span class="help_text">
	                    {{ field.help_text }}
	                </span>
	            {% endif %}
	        </td>
	    </tr>
	    {% endfor %}        
	    <tr>
	        <td>&nbsp;</td>
	        <td><input type="submit" value="Ja, diesen Account endgültig löschen" /></td>
	    </tr>
	</table>
	</form>
{% else %}
	{% hintblock %}
		{{ msg }}
		<br /><br />
		<a href="{% root_url %}">Zur Startseite</a>
	{% endhintblock %}
{% endif %}
{% endblock %}